<template>
  <transition name="el-zoom-in-top">
    <el-container class="app-content" v-if="curRoute !== 'console'">
      <el-header height="48px">
        <page-header></page-header>
      </el-header>
      <el-container>
        <el-aside width="200px">
          <left-menu></left-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
    <el-container class="app-content block" v-else>
      <router-view></router-view> </el-container
  ></transition>
</template>

<script>
import LeftMenu from './components/leftMenu.vue'
import PageHeader from './components/pageHeader.vue'

export default {
  name: 'App',
  components: { PageHeader, LeftMenu },
  created() { },
  computed: {
    hideNavbar() {
      return this.$route.meta.hideNavbar || false;
    },
    curRoute() {
      return this.$route.name
    }
  }

}
</script>


<style>
html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  color: #333;
  font-size: 12px;
}
.app-content {
  height: 100%;
  overflow: hidden;
}
.el-header {
  border-bottom: 1px solid #e7e7e7;
}
.el-main {
  background: #f4f5f9;
  height: calc(100vh - 48px);
  overflow-x: hidden;
  overflow-y: scroll;
}
</style>
